'use strict';

function mutiupload(imgList, file_path, count, length, title, callback) {
	uniCloud.uploadFile({
	      cloudPath: title + '--' + count + '.jpg',
	      filePath: imgList[count],
	    })
		.then(res => {
	      file_path.push(res.fileID)
	      count++
	      if (count == length) {
	        callback(file_path)
	      } else(
	        mutiupload(imgList, file_path, count, length, title, callback)
	      )
	    })
}
	

module.exports = {
	mutiupload
}